import javax.lang.model.util.ElementScanner6;

public class DaysOrder {
    //输入具体年月日，判断该天是一年中的第几天

    public static void main(String[] args){
        DaysOrder day = new DaysOrder();
        day.order(1996, 7, 14);        
    }

    public void order(int year, int month, int day){
        int sum = 0;
        if(month > 0)
            sum += day;
        if(month > 1)
            sum += 31;
        if(month > 2){
            if(isLeap(year))
                sum += 29;
            else
                sum += 28;
        }
        if(month > 3)
            sum += 31;
        if(month > 4)
            sum += 30;
        if(month > 5)
            sum += 31;
        if(month > 6)
            sum += 30;
        if(month > 7)
            sum += 31;
        if(month > 8)
            sum += 31;
        if(month > 9)
            sum += 30;
        if(month > 10)
            sum += 31;
        if(month > 11)
            sum += 30;

        System.out.println("This day is the "+ sum + "  day of this year");
    }

    public boolean isLeap(int year){
        if(year % 400 == 0)
            return true;
        else if(year % 4 == 0)
            return true;
        
        return false;
        
    }

}